package com.hjd.shop.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.hjd.shop.api.service.SGoodsService;
import com.hjd.shop.entity.SGoods;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: hjd
 * @Date: 2020/10/25 0025 22:38
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {
    @Reference
    private SGoodsService goodsService;

    @PostMapping("/add")
    public void addGoods(@RequestBody SGoods goods){
        goodsService.addGoods(goods);
    }

    @GetMapping("/test")
    public String testMapping(String msg){
        return goodsService.test(msg);
    }
}
